[ToC] [Up] [Back] [Next] ... [Book Plug] |
The Information Commons .................... Introduction to HTML |
The HTML Language contains several elements that allow for user input. The simplest of these is ISINDEX, which can take a single line of text as user input. Much more sophisicated is the FORM element and its associated sub-elements INPUT, TEXTAREA, and SELECT, which allow for more sophisticated user input via fill-in FORMs. These allow for author specified radio and checkbox buttons (using INPUT elements), single-line text input fields (again using INPUT), selectable lists (via SELECT) and block text input regions (via TEXTAREA).
The data input into a FORM are sent to a server, although in this case the FORM element contains an attribute, ACTION, which specifies the URL to which the data should be sent. In addition, the FORM element can select the HTTP method by which the data are sent -- the GET HTTP method means that the data are appended to the URL like a query string, while the POST method means that the data are sent as a message body, much as data are sent from the server to the browser, but in the opposite direction.
I have not written a long description of forms, as NCSA has already done an admirable job. This document contains (1) a simple introduction to what FORMS do and (2) a link to the more detailed NCSA document (containing serveral examples)
An example (if rather idiotic) FORM is:
<FORM ACTION="http://bla.bla.edu/cgi-bin/some-prgm" METHOD=POST> First entry field: <INPUT NAME="entry1"> <BR> Second entry field: <INPUT NAME="entry2" VALUE="bloop"> <BR> Third entry field: <INPUT NAME="entry3"> --- Select Option: <SELECT NAME="entry4"> <OPTION VALUE="no1">Frogs <OPTION VALUE="no2">Peaches <OPTION VALUE="no3">Cream <OPTION VALUE="no4">Newts </SELECT>
To submit the query, press: <INPUT TYPE="submit" VALUE="Submit Query">. <P> </FORM>
FORMS are supported by almost all browsers. If you see nothing above here that looks like a form, then your browser does not.
The METHOD specifies the HTTP method to be used to submit the form information to the server. METHOD can have two arguments:
For more information on FORMs you should also consult the NCSA Fill-out Forms documentation. This contains detailed information on FORMs and the way in which form data are sent to a server.
[ToC] [Up] [Back] [Next] ... [Book Plug] | .................... Introduction to HTML |
© Ian Graham 1994-1995 | Page Last Updated: 4 December 1995 |